﻿<%@ Page Title="" Language="C#" MasterPageFile="~/管理员.Master" AutoEventWireup="true" CodeBehind="订单管理.aspx.cs" Inherits="TicketManagement.订单管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
    .auto-style3 {
        position: relative;
        left: 355px;
        top: 61px;
        width: 890px;
        height: 501px;
    }
        .auto-style4 {
            height: 544px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="auto-style4"> 
        
        <div align="center" vertical-align="center"   >
         </div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="productNumber" DataSourceID="SqlDataSource1" AllowPaging="True" AllowSorting="True" HorizontalAlign="Justify" PageSize="5" CssClass="auto-style3"   >
            <Columns>
                <asp:BoundField DataField="productNumber" HeaderText="productNumber" ReadOnly="True" SortExpression="productNumber" />
                <asp:BoundField DataField="orderTime" HeaderText="orderTime" SortExpression="orderTime" />
                <asp:BoundField DataField="productQuantity" HeaderText="productQuantity" SortExpression="productQuantity" />
                <asp:BoundField DataField="totalPrice" HeaderText="totalPrice" SortExpression="totalPrice" />
                <asp:BoundField DataField="productStatus" HeaderText="productStatus" SortExpression="productStatus" />
                <asp:BoundField DataField="remarks" HeaderText="remarks" SortExpression="remarks" />
                <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
                <asp:BoundField DataField="OTAName" HeaderText="OTAName" SortExpression="OTAName" />
                <asp:BoundField DataField="productName" HeaderText="productName" SortExpression="productName" />
            </Columns>
            <RowStyle HorizontalAlign="Center" />
        </asp:GridView>
           
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ticket_management_systemConnectionString %>" ProviderName="<%$ ConnectionStrings:ticket_management_systemConnectionString.ProviderName %>" SelectCommand="SELECT orderinformation.productNumber, orderinformation.orderTime, orderinformation.productQuantity, orderinformation.totalPrice, orderinformation.productStatus, orderinformation.remarks, distributorcompany.name, otaplatform.OTAName, inventory.productName FROM orderinformation INNER JOIN distributorcompany ON orderinformation.distributorCompanyNumber_id = distributorcompany.distributorCompanyNumber INNER JOIN otaplatform ON orderinformation.OTANumber_id = otaplatform.OTANumber INNER JOIN inventory ON orderinformation.inventoryNumber_id = inventory.inventoryNumber" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [orderinformation] WHERE [productNumber] = ? AND (([orderTime] = ?) OR ([orderTime] IS NULL AND ? IS NULL)) AND (([productQuantity] = ?) OR ([productQuantity] IS NULL AND ? IS NULL)) AND (([totalPrice] = ?) OR ([totalPrice] IS NULL AND ? IS NULL)) AND (([productStatus] = ?) OR ([productStatus] IS NULL AND ? IS NULL)) AND (([remarks] = ?) OR ([remarks] IS NULL AND ? IS NULL)) AND (([distributorCompanyNumber_id] = ?) OR ([distributorCompanyNumber_id] IS NULL AND ? IS NULL)) AND (([OTANumber_id] = ?) OR ([OTANumber_id] IS NULL AND ? IS NULL)) AND (([inventoryNumber_id] = ?) OR ([inventoryNumber_id] IS NULL AND ? IS NULL))" InsertCommand="INSERT INTO [orderinformation] ([productNumber], [orderTime], [productQuantity], [totalPrice], [productStatus], [remarks], [distributorCompanyNumber_id], [OTANumber_id], [inventoryNumber_id]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [orderinformation] SET [orderTime] = ?, [productQuantity] = ?, [totalPrice] = ?, [productStatus] = ?, [remarks] = ?, [distributorCompanyNumber_id] = ?, [OTANumber_id] = ?, [inventoryNumber_id] = ? WHERE [productNumber] = ? AND (([orderTime] = ?) OR ([orderTime] IS NULL AND ? IS NULL)) AND (([productQuantity] = ?) OR ([productQuantity] IS NULL AND ? IS NULL)) AND (([totalPrice] = ?) OR ([totalPrice] IS NULL AND ? IS NULL)) AND (([productStatus] = ?) OR ([productStatus] IS NULL AND ? IS NULL)) AND (([remarks] = ?) OR ([remarks] IS NULL AND ? IS NULL)) AND (([distributorCompanyNumber_id] = ?) OR ([distributorCompanyNumber_id] IS NULL AND ? IS NULL)) AND (([OTANumber_id] = ?) OR ([OTANumber_id] IS NULL AND ? IS NULL)) AND (([inventoryNumber_id] = ?) OR ([inventoryNumber_id] IS NULL AND ? IS NULL))">
            <DeleteParameters>
                <asp:Parameter Name="original_productNumber" Type="Int32" />
                <asp:Parameter Name="original_orderTime" Type="DateTime" />
                <asp:Parameter Name="original_orderTime" Type="DateTime" />
                <asp:Parameter Name="original_productQuantity" Type="Int32" />
                <asp:Parameter Name="original_productQuantity" Type="Int32" />
                <asp:Parameter Name="original_totalPrice" Type="Int32" />
                <asp:Parameter Name="original_totalPrice" Type="Int32" />
                <asp:Parameter Name="original_productStatus" Type="String" />
                <asp:Parameter Name="original_productStatus" Type="String" />
                <asp:Parameter Name="original_remarks" Type="String" />
                <asp:Parameter Name="original_remarks" Type="String" />
                <asp:Parameter Name="original_distributorCompanyNumber_id" Type="Int32" />
                <asp:Parameter Name="original_distributorCompanyNumber_id" Type="Int32" />
                <asp:Parameter Name="original_OTANumber_id" Type="Int32" />
                <asp:Parameter Name="original_OTANumber_id" Type="Int32" />
                <asp:Parameter Name="original_inventoryNumber_id" Type="Int32" />
                <asp:Parameter Name="original_inventoryNumber_id" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="productNumber" Type="Int32" />
                <asp:Parameter Name="orderTime" Type="DateTime" />
                <asp:Parameter Name="productQuantity" Type="Int32" />
                <asp:Parameter Name="totalPrice" Type="Int32" />
                <asp:Parameter Name="productStatus" Type="String" />
                <asp:Parameter Name="remarks" Type="String" />
                <asp:Parameter Name="distributorCompanyNumber_id" Type="Int32" />
                <asp:Parameter Name="OTANumber_id" Type="Int32" />
                <asp:Parameter Name="inventoryNumber_id" Type="Int32" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="orderTime" Type="DateTime" />
                <asp:Parameter Name="productQuantity" Type="Int32" />
                <asp:Parameter Name="totalPrice" Type="Int32" />
                <asp:Parameter Name="productStatus" Type="String" />
                <asp:Parameter Name="remarks" Type="String" />
                <asp:Parameter Name="distributorCompanyNumber_id" Type="Int32" />
                <asp:Parameter Name="OTANumber_id" Type="Int32" />
                <asp:Parameter Name="inventoryNumber_id" Type="Int32" />
                <asp:Parameter Name="original_productNumber" Type="Int32" />
                <asp:Parameter Name="original_orderTime" Type="DateTime" />
                <asp:Parameter Name="original_orderTime" Type="DateTime" />
                <asp:Parameter Name="original_productQuantity" Type="Int32" />
                <asp:Parameter Name="original_productQuantity" Type="Int32" />
                <asp:Parameter Name="original_totalPrice" Type="Int32" />
                <asp:Parameter Name="original_totalPrice" Type="Int32" />
                <asp:Parameter Name="original_productStatus" Type="String" />
                <asp:Parameter Name="original_productStatus" Type="String" />
                <asp:Parameter Name="original_remarks" Type="String" />
                <asp:Parameter Name="original_remarks" Type="String" />
                <asp:Parameter Name="original_distributorCompanyNumber_id" Type="Int32" />
                <asp:Parameter Name="original_distributorCompanyNumber_id" Type="Int32" />
                <asp:Parameter Name="original_OTANumber_id" Type="Int32" />
                <asp:Parameter Name="original_OTANumber_id" Type="Int32" />
                <asp:Parameter Name="original_inventoryNumber_id" Type="Int32" />
                <asp:Parameter Name="original_inventoryNumber_id" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>

        </div>
</asp:Content>

